import json

import pytest

from APIs.loginAPI import Login
from datas.file.du import DoExe

f = r"D:\2501\apiauto\datas\file\接口测试悟空.xlsx"
mydata = DoExe().doExeRead(f, "login", 2, 13, 3, 7)


class TestLogin():
    @pytest.mark.parametrize("title,url,method,mydata,yq", mydata)
    def testLoin(self, title, url, method, mydata, yq):
        mydata = json.loads(mydata)
        a = Login().login(mydata)
        assert a == yq
